namespace Digitalmes.Domain.Entities.Mes.Equipments;

/// <summary>
/// 设备点检数据。
/// </summary>
[SugarTable("equip_inspection_data")]
public sealed class EquipInspectionData : EntityBase
{
    /// <summary>
    /// 点检记录 Id
    /// </summary>
    public long RecordId { get; set; }

    /// <summary>
    /// 点检项名称
    /// </summary>
    [NotNull]
    public string? SubjectName { get; set; }

    /// <summary>
    /// 点检标准
    /// </summary>
    /// <remarks>自动点检，填入标准设定的上下限</remarks>
    public string? Standard { get; set; }

    /// <summary>
    /// 检查数据（人工目检设备没有数据）
    /// </summary>
    /// <remarks>自动点检由设备采集数据自动填入，人工点检由操作人员录入数据，没有数据则不填</remarks>
    public double? Value { get; set; }

    /// <summary>
    /// 点检结果（正常/异常/超标）
    /// </summary>
    [SugarColumn(SqlParameterDbType = typeof(EnumToStringConvert))]
    public InspectResultEnum Result { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
}
